// 退出事件
$('.logout').click(() => {
  // 使用一个 提示弹出层
  console.log(000);
  let index = layer.confirm('你真的要退出吗?', () => {
    // 点击确定
    // 清除cookie
    delCookie('username');
    // 关闭弹出层
    layer.close(index);
    // 渲染登录注册
   location.href='index.html'
  }, () => {
    layer.msg('你已经取消退出');
  })
  return false
})


// 时间渲染 
let cutTime = 20* 60;
let summer = setInterval(counclock,1000) ;
function counclock(){
let min = '';
let sec = '';
if ( cutTime > 0) {
min = Math.floor(cutTime / 60);
sec = Math.floor(cutTime % 60);
if (sec < 10){
sec = '0'+sec;};
cutTime--;
}else{
$('.mask').hide( ) ;
$('.adress>b').text('又逛超时了。')
clearInterval ( summer) ;
}
$('.min').text(min)
$('.sec').text(sec)
$('.clock').text(`${min}分${sec}秒`).css('color','#f10180')
$('.tip i').text(`${min}:${sec}`)
}






